package com.allwees.bs.module.scm.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.allwees.bs.core.modelbase.entity.WfBaseEntity;
import com.allwees.bs.module.core.wf.WorkflowAware;
import com.allwees.bs.module.scm.constant.ELogisticsType;
import com.allwees.core.common.constant.EStatus;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("scm_shipping_order")
public class ScmShippingOrder extends WfBaseEntity implements WorkflowAware {

    public ScmShippingOrder(String uuid) {
        this.uuid = uuid;
    }

    @Column(length = 48, updatable = false)
    private String supplierUuid;

    @Column(length = 48, updatable = false)
    private String retailerUuid;

    @Column(length = 48, updatable = false)
    private String storeUuid;

    /** 编号 **/
    @Column(updatable = false)
    private String no;

    /** 商品总应发数量 **/
    private Integer quantity;

    /** 商品总发货数量 **/
    private Integer shippingQuantity;

    /** 商品总价格（RMB） **/
    private BigDecimal amt;

    /** 物流类型 **/
    private ELogisticsType logisticsType;

    /** 物流公司 **/
    @Column(length = 48, updatable = false)
    private String logisticsUuid;

    /** 物流单号 **/
    @Column(updatable = false)
    private String expressCode;

    /** 预约年月日 **/
    private Date reserveDate;

    /** 预约时间范围 **/
    private String reserveRange;

    /** 发货时间 **/
    private Date shippingAt;

    /** 仓库 uuid **/
    private String warehouseUuid;

    /** 收货地址 **/
    private String receiveAddressUuid;

    /** 发货人 **/
    private String shippingUserUuid;

    /** 打印时间 **/
    private Date printAt;

    /** 打印次数 **/
    private int printCount;

    /** 物流包裹状态 **/
    private EStatus logisticsPackStatus;

    /** 收货人 **/
    private String receiverUuid;

    /** 收货人 **/
    private String receiverName;
}
